//package org.ricks.net.consumer;
//
//import org.ricks.common.ModularContext;
//import org.ricks.ioc.RicksContext;
//import org.ricks.net.*;
//import org.ricks.protocol.ByteBuf;
//import org.ricks.protocol.ProtocolManager;
//import org.ricks.router.InnerHandler;
//import org.ricks.router.TcpInnerProtocol;
//
//import java.io.IOException;
//import java.util.Set;
//
//public class GameRun {
//
//    public static void main(String[] args) throws IOException {
//        ModularContext.me().scan(Set.of("org.ricks.net"));
//        ProtocolManager.initProtocol(Set.of(ModuleInfo.class, DefaultPacket.class));
//        RicksContext.me().init();
//        NetContext.me().init();
//        TcpInnerProtocol innerProtocol = new TcpInnerProtocol();
//        InnerHandler innerHandler = new InnerHandler();
//        AioClient aioClient = new AioClient("127.0.0.1",9100,  innerProtocol, innerHandler);
//        AioSession aioSession = aioClient.start();
//        ModuleInfo moduleInfo = new ModuleInfo((byte)1,(short)1);
//        ByteBuf buf = new ByteBuf(1024);
//        ProtocolManager.write(buf, moduleInfo);
//        Router.me().send(aioSession, new DefaultPacket((short) 1000, buf.toArray()));
////        aioSession.send(new DefaultPacket((short) 1000, buf.toArray()));
////        Consumer.me().send((short) 2051,null, "1232432");
//    }
//}
